package org.martin.snsrs.client.model;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.json.JSONException;
import org.json.JSONObject;

public class ActivityEntity extends Entity{
	
	private String activityName;
	
	private String activityDesc;
	
	private Date startTime;
	
	private Date endTime;
	
	private String picPath;
	
	private String activityLocation;

	public ActivityEntity(JSONObject object) {
		super(object);
		
	}
	
	protected void onParse(JSONObject object){
		if(!isSuccess)
			return;
		try {
			activityDesc = object.getString("activityDesc");
			activityName = object.getString("activityName");
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:MM:SS");
			startTime = sdf.parse(object.getString("activityStartTime"));
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
	}

}
